package com.bmps.springcloud.insuredmicroservice.model.trail.request;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

import java.io.Serializable;
import java.util.List;

/**
 * @Author :  zlc
 * @Date : 2019/9/10 10:57
 **/
public class TrailInsurantsModel implements Serializable {

    private Integer insCount;

    private List<TrailInsurantModel> insurant;

    public Integer getInsCount() {
        return insCount;
    }

    public void setInsCount(Integer insCount) {
        this.insCount = insCount;
    }

    public List<TrailInsurantModel> getInsurant() {
        return insurant;
    }

    public void setInsurant(List<TrailInsurantModel> insurant) {
        this.insurant = insurant;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {return true;}

        if (o == null || getClass() != o.getClass()) {return false;}

        TrailInsurantsModel that = (TrailInsurantsModel) o;

        return new EqualsBuilder()
                .append(insCount, that.insCount)
                .append(insurant, that.insurant)
                .isEquals();
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder(17, 37)
                .append(insCount)
                .append(insurant)
                .toHashCode();
    }

    @Override
    public String toString() {
        return "TrailInsurantsModel{" +
                "insCount=" + insCount +
                ", insurant=" + insurant +
                '}';
    }
}
